<?php

class Kd_Html_Element_Link extends Kd_Html_Element {

    private $_text = '';

    public function  __construct() {
        parent::__construct();
    }

    public function getText(){
        return $this->_text;
    }
    public function setText($value){
        $this->_text = $value;
        return $this;
    }

    public function getHref(){
        return isset($this->attributes['href'])? $this->attributes['href']: '';
    }
    public function setHref($value){
        $this->setAttribute('href', $value);
        return $this;
    }

    public function getTarget(){
        return isset($this->attributes['target'])? $this->attributes['target']: '';
    }
    public function setTarget($value){
        $this->attributes['target'] = $value;
        return $this;
    }

    protected function render(){
        return '<a'.$this->getAttributeHtml().'>'
               . '<span><span>'.$this->getText().'</span></span></a>';
    }
}